﻿using System;
using Atendex.Dominio.Interfaces;
using Castle.ActiveRecord;

namespace Atendex.Dominio.ActiveRecord
{
    [ActiveRecord("responsavel_area")]
    [Serializable]
    public class ResponsavelAR : ActiveRecordBase<ResponsavelAR>, IResponsavel
    {
        private ResponsavelAR()
        {
        }

        internal ResponsavelAR(string nome, string email)
        {
            Nome = nome;
            Email = email;
        }

        [PrimaryKey]
        public int Id { get; private set; }

        [Property]
        public string Nome { get; set; }

        [Property]
        public string Email { get; set; }

        [BelongsTo(Type = typeof(AreaAR), Cascade = CascadeEnum.None)]
        public IArea Area { get; set; }
    }
}